#ifndef __BSP_FLASH_H__
#define __BSP_FLASH_H__

void bsp_flash_init(void);
int bsp_flash_page_erase(unsigned char page);
int bsp_flash_page_write(unsigned char page, unsigned char *data, unsigned short len);


#define BSP_FLASH_READ_BYTE(x) (*((volatile unsigned char *)(x)))
#define BSP_FLASH_READ_HWORD(x) (*((volatile unsigned short *)(x)))
#define BSP_FLASH_READ_WORD(x) (*((volatile unsigned int *)(x)))

#endif
